//
//  SNSMessageViewCell.m
//  iBaby365v2
//
//  Created by Kirinrin on 14-7-28.
//  Copyright (c) 2014年 suplus. All rights reserved.
//

#import "SNSMessageViewCell.h"


@implementation SNSMessageViewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
    }
    return self;
}

- (void)awakeFromNib
{
    // Initialization code
//    for (UIView *child in self.contentView.subviews) {
//        NSLog(@"=====child==%@",child);
//    }
    if (self.tag == 20) {
        UIImageView *iconView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"sns_tongzhi_lv"]];
        [self addSubview:iconView];
        iconView.frame = CGRectMake(11, 5, 35, 36-1);
        UILabel *iconLable = [[UILabel alloc]init];
        iconLable.text = @"托咐提醒";
        iconLable.textColor = [UIColor whiteColor];
        iconLable.font = [UIFont systemFontOfSize:11];
        iconLable.numberOfLines = 0;
        iconLable.textAlignment = NSTextAlignmentCenter;
        [self addSubview:iconLable];
        iconLable.frame = CGRectMake(13, 5, 31, 35);
    }
     
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

#pragma mark - setter & getter
-(void)setData:(NSDictionary *)data{
    if (data) {
        _data = data;
        _id = data[@"id"];
        [self.messgeLabel setText:data[@"content"]];
    }
}

@end
